package com.yami.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.dto.MeltCloudGroupsAndUserDTO;
import com.yami.shop.bean.dto.MeltCloudGroupsDTO;
import com.yami.shop.bean.model.MeltCloudGroup;
import com.yami.shop.bean.model.MeltCloudUser;
import com.yami.shop.bean.vo.MeltCloudGroupsVo;
import com.yami.shop.common.bean.PageDTO;
import com.yami.shop.common.bean.PageVO;
import com.yami.shop.common.util.PageParam;

import java.util.List;
import java.util.Map;

public interface MeltCloudUserService extends IService<MeltCloudUser> {


    /**
     * 注册融云用户
     * @param meltCloudUser
     */
    void registeredRongYunUser(MeltCloudUser meltCloudUser);


    /**
     * 根据融云用户ids查询用户详细信息
     * @param userIds
     * @return
     */
    List<MeltCloudUser> list(List<String> userIds);


    /**
     * 根据参数获取详细信息
     * @param groupsDTOS
     */
    MeltCloudGroupsVo getDetail(List<MeltCloudGroupsDTO>groupsDTOS);

    List<MeltCloudGroupsDTO> getConversationDetail(MeltCloudGroupsAndUserDTO meltCloudGroupsAndUser);

    /**
     * 获取群组成员基本信息
     * @param groupId
     * @return
     */
    List<MeltCloudUser>getGroupsUser(Long groupId);
    /**
     * 获取群组成员基本信息 昵称搜索
     * @param groupId
     * @return
     */
    List<MeltCloudUser>getGroupsUser(Long groupId,String userName,String userId,Boolean isDel);

    Map<String,MeltCloudUser> getUserInfoMap(Long groupId, String userId);

    Map<String,Object> getUserInfoCount(Long groupId, Boolean isDel,String userId);
    /**
     * 获取群组成员基本信息
     * @param groupId
     * @param userIds
     * @return
     */
    List<MeltCloudUser>getGroupsUser(Long groupId,List<String>userIds,String userName);

    /**
     * 获取某个人加入的群组
     * @param userId
     * @return
     */
    List<MeltCloudGroup> groups(String userId,String userName);

    IPage<MeltCloudGroup> groupsPage(PageParam<MeltCloudGroup> page, String currentId, String userName,Boolean ignoreProhibition);

    Long groupsCount(String userId,String userName);


    /**
     * 获取群组成员
     * @param pageDTO
     * @param userName
     * @return
     */

    PageVO<MeltCloudUser> getAll(PageDTO pageDTO, String userName, String groupId, List<String> userIds,String status);
}
